package com.bjfu.eduservice.controller;

import com.bjfu.common_utils.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/eduservice/user")
@CrossOrigin
@Api("登录管理")
public class LoginController {

    @PostMapping("login")
    public R login(){
        return R.ok().data("token","admin");
    }

    @GetMapping("info")
    public R getInfo(){
        return R.ok().data("roles","[admin]")
                .data("name","admin")
                .data("avatar","https://edu478.oss-cn-hangzhou.aliyuncs.com/01.gif");
    }
}
